package crp.core.portal.domain.models;


import crp.core.shared.LifecycleStatus;
import com.qwlabs.storage.models.StorageObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;

@Getter
@Builder
@AllArgsConstructor
public class CreateNewsArticleCommand {
    private final String title;
    private final String content;
    private final StorageObject cover;

    public NewsArticleEntity of() {
        NewsArticleEntity entity = new NewsArticleEntity();
        entity.setTitle(title);
        entity.setContent(content);
        entity.setCover(cover);
        entity.setStatus(LifecycleStatus.DRAFT);
        return entity;
    }
}
